package com.lmf.springboot.controller;

import com.lmf.springboot.demo.Dog;
import com.lmf.springboot.demo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;



@Controller
public class MyController {

    @Autowired
    private Student student;
    @Autowired
    private Dog dog;
    @Value("${student.name}")
    private String name;

    @RequestMapping("/hello")
    @ResponseBody
    public String dosome(){
        return "hello,"+student.getName()+student.getAge()+
                "\n"+dog.toString()+
                "\n"+name;
    }
}
